package com.xinchao.ck_mips.base;

import android.os.Bundle;

import com.xinchao.ck_mips.contract.BaseContract;

public abstract class MvpActivity<P extends BaseContract.Presenter> extends BaseActivity {

    protected P mPresenter;

    @Override
    protected void onCreated(Bundle savedInstanceState) {
        mPresenter = createPresenter();
        onCreatePresenter(savedInstanceState);
    }

    protected abstract void onCreatePresenter(Bundle savedInstanceState);

    protected abstract P createPresenter();
}
